library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

entity user_auth is    
    port (clk : in std_logic;
          reset : in std_logic;
	  password_ready : in std_logic;
          password : in std_logic_vector(127 downto 0);
	  authenticated : out std_logic;
	  authenticated_ready : out std_logic);
end user_auth;

architecture Behavioral of user_auth is
begin
	process (clk, reset)
	begin  -- process
		if (reset = '1') then
			authenticated <= '0';
			authenticated_ready <= '0';
		elsif (clk = '1' and clk'event) then
			if (password_ready = '1') then
				if (password = x"5448495349534d5950415353574f5244") then
					authenticated <= '1';
				else
					authenticated <= '0';
				end if;
				authenticated_ready <= '1';
			end if;
		end if;
	end process;
end Behavioral;






